package com.ly;

import java.io.UnsupportedEncodingException;

/**
 * @author LY
 * @date 2021年04月22日 15:43
 * @project test
 */
public class 乱码测试 {
    public static void main(String[] args) throws UnsupportedEncodingException {
//        String s= "王群";
//        byte[] gbks = s.getBytes("gbk");
//        System.out.println(gbks);
//        System.out.println(new String(gbks,"gbk"));
//        System.out.println(new String(gbks,"iso-8859-1"));

        String s = "ãÆ¶«Ñ©";
        byte[] bytes = s.getBytes("ISO-8859-1");
        System.out.println(new String(bytes,"gb2312"));
    }
}
